package com.data.platform.swagger2.autoconfigure;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

@Data
@ConfigurationProperties("swagger")
public class SwaggerProperties {
    /**
     * 是否开启swagger
     */
    private Boolean enabled;
    /**
     * 解析的包路径
     */
    private String basePackage = "";
    /**
     * 标题
     */
    private String title = "";

    /**
     * 描述
     */
    private String description = "";

    /**
     * 服务条款URL
     **/
    private String termsOfServiceUrl = "";

    /**
     * 联系人信息
     */
    private Contact contact = new Contact();

    /**
     * 版本
     */
    private String version = "";

    /**
     * host信息
     */
    private String host = "";

    /**
     * 许可证
     */
    private String license = "";

    /**
     * 许可证url
     */
    private String licenseUrl = "";

    /**
     * 需解析的url
     */
    private List<String> basePath = new ArrayList<>();

    /**
     * 需排除的url
     */
    private List<String> excludePath = new ArrayList<>();

    @Data
    public static class Contact {
        /**
         * 联系人
         */
        private String name = "";

        /**
         * 联系人url
         */
        private String url = "";

        /**
         * 联系人email
         */
        private String email = "";
    }
}
